<?xml version="1.0" encoding="utf-8" ?>
<sqlMap namespace='EquipmentH' xmlns='http://ibatis.apache.org/mapping' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <alias>
    <typeAlias alias='EquipmentH' assembly='Janus.Mes.POCO.dll' type='Janus.Mes.POCO.EquipmentH' />
  </alias>
  <resultMaps>
    <resultMap id='EquipmentHResult' class='EquipmentH'>
	<result property='Id' column='Id' /> 
	<result property='EquiCode' column='EquiCode' /> 
	<result property='AssetsCode' column='AssetsCode' /> 
	<result property='CatCode' column='CatCode' /> 
	<result property='EquiGroup' column='EquiGroup' /> 
	<result property='OtherCode' column='OtherCode' /> 
	<result property='EquiName' column='EquiName' /> 
	<result property='EquiSpec' column='EquiSpec' /> 
	<result property='WorkCentor' column='WorkCentor' /> 
	<result property='StorageLoc' column='StorageLoc' /> 
	<result property='Custodian' column='Custodian' /> 
	<result property='RunHour' column='RunHour' /> 
	<result property='StartDate' column='StartDate' /> 
	<result property='ScrapDate' column='ScrapDate' /> 
	<result property='CycleUnit' column='CycleUnit' /> 
	<result property='Remark' column='Remark' /> 
	<result property='Creator' column='Creator' /> 
	<result property='CreateDate' column='CreateDate' /> 
	<result property='Updater' column='Updater' /> 
	<result property='UpdateDate' column='UpdateDate' /> 
	<result property='IsDelete' column='IsDelete' /> 
	<result property='CreatorCode' column='CreatorCode' /> 
	<result property='UpdaterCode' column='UpdaterCode' /> 
	<result property='OperDept' column='OperDept' /> 
	<result property='Timestamp' column='Timestamp' /> 
	<result property='EquiState' column='EquiState' /> 
	<result property='UseState' column='UseState' /> 
		</resultMap>
  </resultMaps>  
  <statements>
  <sql id="UpdaterConditions">  
  <dynamic prepend="SET">
        	<isPropertyAvailable prepend="" property="AssetsCode">
        <isNotEmpty prepend="," property="AssetsCode">
		          [AssetsCode]=#AssetsCode#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="CatCode">
        <isNotEmpty prepend="," property="CatCode">
		          [CatCode]=#CatCode#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="EquiGroup">
        <isNotEmpty prepend="," property="EquiGroup">
		          [EquiGroup]=#EquiGroup#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="OtherCode">
        <isNotEmpty prepend="," property="OtherCode">
		          [OtherCode]=#OtherCode#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="EquiName">
        <isNotEmpty prepend="," property="EquiName">
		          [EquiName]=#EquiName#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="EquiSpec">
        <isNotEmpty prepend="," property="EquiSpec">
		          [EquiSpec]=#EquiSpec#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="WorkCentor">
        <isNotEmpty prepend="," property="WorkCentor">
		          [WorkCentor]=#WorkCentor#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="StorageLoc">
        <isNotEmpty prepend="," property="StorageLoc">
		          [StorageLoc]=#StorageLoc#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="Custodian">
        <isNotEmpty prepend="," property="Custodian">
		          [Custodian]=#Custodian#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="RunHour">
        <isNotEmpty prepend="" property="RunHour">
				  <isNotEqual prepend="," property="RunHour" compareValue="0">
		          [RunHour]=#RunHour#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="StartDate">
        <isNotEmpty prepend="," property="StartDate">
		          [StartDate]=#StartDate#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="ScrapDate">
        <isNotEmpty prepend="" property="ScrapDate">
				  <isNotEqual prepend="," property="ScrapDate" compareValue="1900-01-01">
		          [ScrapDate]=#ScrapDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="CycleUnit">
        <isNotEmpty prepend="," property="CycleUnit">
		          [CycleUnit]=#CycleUnit#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="Remark">
        <isNotEmpty prepend="," property="Remark">
		          [Remark]=#Remark#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="Creator">
        <isNotEmpty prepend="," property="Creator">
		          [Creator]=#Creator#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="CreateDate">
        <isNotEmpty prepend="" property="CreateDate">
				  <isNotEqual prepend="," property="CreateDate" compareValue="1900-01-01">
		          [CreateDate]=#CreateDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="Updater">
        <isNotEmpty prepend="," property="Updater">
		          [Updater]=#Updater#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="UpdateDate">
        <isNotEmpty prepend="" property="UpdateDate">
				  <isNotEqual prepend="," property="UpdateDate" compareValue="1900-01-01">
		          [UpdateDate]=#UpdateDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="IsDelete">
        <isNotEmpty prepend="" property="IsDelete">
				  <isNotEqual prepend="," property="IsDelete" compareValue="0">
		          [IsDelete]=#IsDelete#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="CreatorCode">
        <isNotEmpty prepend="," property="CreatorCode">
		          [CreatorCode]=#CreatorCode#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="UpdaterCode">
        <isNotEmpty prepend="," property="UpdaterCode">
		          [UpdaterCode]=#UpdaterCode#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="OperDept">
        <isNotEmpty prepend="," property="OperDept">
		          [OperDept]=#OperDept#
		          </isNotEmpty>
      </isPropertyAvailable>	
	      	<isPropertyAvailable prepend="" property="EquiState">
        <isNotEmpty prepend="," property="EquiState">
		          [EquiState]=#EquiState#
		          </isNotEmpty>
      </isPropertyAvailable>	
	    	<isPropertyAvailable prepend="" property="UseState">
        <isNotEmpty prepend="," property="UseState">
		          [UseState]=#UseState#
		          </isNotEmpty>
      </isPropertyAvailable>	
	  	 </dynamic>
    </sql>
	<sql id="WhereConditions">
	 <dynamic prepend="WHERE">
	 	 <isPropertyAvailable prepend="" property="Id">
        <isNotEmpty prepend="AND" property="Id">
		          [Id]=#Id#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="EquiCode">
        <isNotEmpty prepend="AND" property="EquiCode">
		          [EquiCode]=#EquiCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="AssetsCode">
        <isNotEmpty prepend="AND" property="AssetsCode">
		          [AssetsCode]=#AssetsCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="CatCode">
        <isNotEmpty prepend="AND" property="CatCode">
		          [CatCode]=#CatCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="EquiGroup">
        <isNotEmpty prepend="AND" property="EquiGroup">
		          [EquiGroup]=#EquiGroup#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="OtherCode">
        <isNotEmpty prepend="AND" property="OtherCode">
		          [OtherCode]=#OtherCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="EquiName">
        <isNotEmpty prepend="AND" property="EquiName">
		          [EquiName]=#EquiName#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="EquiSpec">
        <isNotEmpty prepend="AND" property="EquiSpec">
		          [EquiSpec]=#EquiSpec#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="WorkCentor">
        <isNotEmpty prepend="AND" property="WorkCentor">
		          [WorkCentor]=#WorkCentor#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="StorageLoc">
        <isNotEmpty prepend="AND" property="StorageLoc">
		          [StorageLoc]=#StorageLoc#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="Custodian">
        <isNotEmpty prepend="AND" property="Custodian">
		          [Custodian]=#Custodian#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="RunHour">
        <isNotEmpty prepend="" property="RunHour">
				  <isNotEqual prepend="AND" property="RunHour" compareValue="0">
		          [RunHour]=#RunHour#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="StartDate">
        <isNotEmpty prepend="AND" property="StartDate">
		          [StartDate]=#StartDate#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="ScrapDate">
        <isNotEmpty prepend="" property="ScrapDate">
				  <isNotEqual prepend="AND" property="ScrapDate" compareValue="1900-01-01">
		          [ScrapDate]=#ScrapDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="CycleUnit">
        <isNotEmpty prepend="AND" property="CycleUnit">
		          [CycleUnit]=#CycleUnit#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="Remark">
        <isNotEmpty prepend="AND" property="Remark">
		          [Remark]=#Remark#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="Creator">
        <isNotEmpty prepend="AND" property="Creator">
		          [Creator]=#Creator#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="CreateDate">
        <isNotEmpty prepend="" property="CreateDate">
				  <isNotEqual prepend="AND" property="CreateDate" compareValue="1900-01-01">
		          [CreateDate]=#CreateDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="Updater">
        <isNotEmpty prepend="AND" property="Updater">
		          [Updater]=#Updater#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="UpdateDate">
        <isNotEmpty prepend="" property="UpdateDate">
				  <isNotEqual prepend="AND" property="UpdateDate" compareValue="1900-01-01">
		          [UpdateDate]=#UpdateDate#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="IsDelete">
        <isNotEmpty prepend="" property="IsDelete">
				  <isNotEqual prepend="AND" property="IsDelete" compareValue="0">
		          [IsDelete]=#IsDelete#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="CreatorCode">
        <isNotEmpty prepend="AND" property="CreatorCode">
		          [CreatorCode]=#CreatorCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="UpdaterCode">
        <isNotEmpty prepend="AND" property="UpdaterCode">
		          [UpdaterCode]=#UpdaterCode#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="OperDept">
        <isNotEmpty prepend="AND" property="OperDept">
		          [OperDept]=#OperDept#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="Timestamp">
        <isNotEmpty prepend="" property="Timestamp">
				  <isNotEqual prepend="AND" property="Timestamp" compareValue="1900-01-01">
		          [Timestamp]=#Timestamp#
		  		  </isNotEqual>
		        </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="EquiState">
        <isNotEmpty prepend="AND" property="EquiState">
		          [EquiState]=#EquiState#
		          </isNotEmpty>
      </isPropertyAvailable>
	  	 <isPropertyAvailable prepend="" property="UseState">
        <isNotEmpty prepend="AND" property="UseState">
		          [UseState]=#UseState#
		          </isNotEmpty>
      </isPropertyAvailable>
	  </dynamic> 
    </sql>
	<sql id="InsertPublic">
      INSERT INTO EquipmentH(
	     <dynamic prepend=" ">
       	   <isPropertyAvailable prepend="" property="Id">
        <isNotEmpty prepend="," property="Id">
          [Id]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="EquiCode">
        <isNotEmpty prepend="," property="EquiCode">
          [EquiCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="AssetsCode">
        <isNotEmpty prepend="," property="AssetsCode">
          [AssetsCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="CatCode">
        <isNotEmpty prepend="," property="CatCode">
          [CatCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="EquiGroup">
        <isNotEmpty prepend="," property="EquiGroup">
          [EquiGroup]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="OtherCode">
        <isNotEmpty prepend="," property="OtherCode">
          [OtherCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="EquiName">
        <isNotEmpty prepend="," property="EquiName">
          [EquiName]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="EquiSpec">
        <isNotEmpty prepend="," property="EquiSpec">
          [EquiSpec]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="WorkCentor">
        <isNotEmpty prepend="," property="WorkCentor">
          [WorkCentor]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="StorageLoc">
        <isNotEmpty prepend="," property="StorageLoc">
          [StorageLoc]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="Custodian">
        <isNotEmpty prepend="," property="Custodian">
          [Custodian]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="RunHour">
        <isNotEmpty prepend="," property="RunHour">
          [RunHour]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="StartDate">
        <isNotEmpty prepend="," property="StartDate">
          [StartDate]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="ScrapDate">
        <isNotEmpty prepend="," property="ScrapDate">
          [ScrapDate]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="CycleUnit">
        <isNotEmpty prepend="," property="CycleUnit">
          [CycleUnit]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="Remark">
        <isNotEmpty prepend="," property="Remark">
          [Remark]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="Creator">
        <isNotEmpty prepend="," property="Creator">
          [Creator]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="CreateDate">
        <isNotEmpty prepend="," property="CreateDate">
          [CreateDate]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="Updater">
        <isNotEmpty prepend="," property="Updater">
          [Updater]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="UpdateDate">
        <isNotEmpty prepend="," property="UpdateDate">
          [UpdateDate]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="IsDelete">
        <isNotEmpty prepend="," property="IsDelete">
          [IsDelete]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="CreatorCode">
        <isNotEmpty prepend="," property="CreatorCode">
          [CreatorCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="UpdaterCode">
        <isNotEmpty prepend="," property="UpdaterCode">
          [UpdaterCode]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="OperDept">
        <isNotEmpty prepend="," property="OperDept">
          [OperDept]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="Timestamp">
        <isNotEmpty prepend="," property="Timestamp">
          [Timestamp]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="EquiState">
        <isNotEmpty prepend="," property="EquiState">
          [EquiState]
        </isNotEmpty>
      </isPropertyAvailable>
	  	   <isPropertyAvailable prepend="" property="UseState">
        <isNotEmpty prepend="," property="UseState">
          [UseState]
        </isNotEmpty>
      </isPropertyAvailable>
	  </dynamic>
      )
      VALUES
      (
	   <dynamic prepend=" ">
      	<isPropertyAvailable prepend="" property="Id">
        <isNotEmpty prepend="," property="Id">		
         #Id#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="EquiCode">
        <isNotEmpty prepend="," property="EquiCode">		
         #EquiCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="AssetsCode">
        <isNotEmpty prepend="," property="AssetsCode">		
         #AssetsCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="CatCode">
        <isNotEmpty prepend="," property="CatCode">		
         #CatCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="EquiGroup">
        <isNotEmpty prepend="," property="EquiGroup">		
         #EquiGroup#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="OtherCode">
        <isNotEmpty prepend="," property="OtherCode">		
         #OtherCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="EquiName">
        <isNotEmpty prepend="," property="EquiName">		
         #EquiName#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="EquiSpec">
        <isNotEmpty prepend="," property="EquiSpec">		
         #EquiSpec#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="WorkCentor">
        <isNotEmpty prepend="," property="WorkCentor">		
         #WorkCentor#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="StorageLoc">
        <isNotEmpty prepend="," property="StorageLoc">		
         #StorageLoc#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="Custodian">
        <isNotEmpty prepend="," property="Custodian">		
         #Custodian#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="RunHour">
        <isNotEmpty prepend="," property="RunHour">		
         #RunHour#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="StartDate">
        <isNotEmpty prepend="," property="StartDate">		
         #StartDate#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="ScrapDate">
        <isNotEmpty prepend="," property="ScrapDate">		
         #ScrapDate#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="CycleUnit">
        <isNotEmpty prepend="," property="CycleUnit">		
         #CycleUnit#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="Remark">
        <isNotEmpty prepend="," property="Remark">		
         #Remark#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="Creator">
        <isNotEmpty prepend="," property="Creator">		
         #Creator#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="CreateDate">
        <isNotEmpty prepend="," property="CreateDate">		
         #CreateDate#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="Updater">
        <isNotEmpty prepend="," property="Updater">		
         #Updater#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="UpdateDate">
        <isNotEmpty prepend="," property="UpdateDate">		
         #UpdateDate#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="IsDelete">
        <isNotEmpty prepend="," property="IsDelete">		
         #IsDelete#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="CreatorCode">
        <isNotEmpty prepend="," property="CreatorCode">		
         #CreatorCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="UpdaterCode">
        <isNotEmpty prepend="," property="UpdaterCode">		
         #UpdaterCode#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="OperDept">
        <isNotEmpty prepend="," property="OperDept">		
         #OperDept#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="Timestamp">
        <isNotEmpty prepend="," property="Timestamp">		
         #Timestamp#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="EquiState">
        <isNotEmpty prepend="," property="EquiState">		
         #EquiState#		
        </isNotEmpty>
      </isPropertyAvailable>
	  	<isPropertyAvailable prepend="" property="UseState">
        <isNotEmpty prepend="," property="UseState">		
         #UseState#		
        </isNotEmpty>
      </isPropertyAvailable>
	  </dynamic>
      )
    </sql>
	<!-- Insert statement:新增Mapper-->
    <insert id='Insert' parameterClass='EquipmentH'>
      <include refid="InsertPublic"/>
    </insert>
    <!--Update statement:修改Mapper-->
    <update id='Update' parameterClass='EquipmentH'>
      UPDATE [EquipmentH] 
      <include refid="UpdaterConditions"/>
      WHERE 1=1
	  	  AND EquiCode=#EquiCode#
	      </update>
    <update id='UpdateSetion' parameterClass='hashtable'>
      UPDATE [EquipmentH] 
      <include refid="UpdaterConditions"/>
      WHERE $conditions$
    </update>
	<update id='Save' parameterClass='EquipmentH'>
      IF NOT EXISTS(SELECT 1 FROM [EquipmentH] WHERE 1=1  AND [EquiCode]=#EquiCode# )
      BEGIN
      <include refid="InsertPublic"/>
      END
      ELSE
      BEGIN
      UPDATE EquipmentH 
      <include refid="UpdaterConditions"/>
      WHERE  1=1
	  	  AND [EquiCode]=#EquiCode#
	        END
    </update>
	<delete id='Delete' parameterClass='hashtable'>
      DELETE FROM [EquipmentH] WHERE	  
        <![CDATA[  
	 [EquiCode]=#pk0# 
        ]]>
    </delete>
    <delete id='DeleteWhere' parameterClass='string'>
      DELETE FROM [EquipmentH] WHERE $value$
    </delete>

    <!-- select by key statement:-->
    <select id='FindOne' parameterClass='hashtable' resultClass='EquipmentH'>
      SELECT * FROM EquipmentH WHERE      
        <![CDATA[
		[EquiCode]=#pk0# 
        ]]>
    </select>
    <select id='FindAllCondition' parameterClass='string' resultClass='EquipmentH'>
      SELECT * FROM [EquipmentH] WHERE $value$
    </select>
    <select id='FindScalar' parameterClass='hashtable' resultClass='EquipmentH'>
      SELECT * FROM [EquipmentH] WHERE $conditions$
    </select>
    
    <select id='FindAllCount' parameterClass='string' resultClass='int'>
      SELECT COUNT(1) FROM [EquipmentH] WHERE $value$
    </select>
    <select id='FindByPage' parameterClass='string' resultClass='EquipmentH'>
      SELECT * FROM [EquipmentH] WHERE $value$
    </select>
  </statements>
</sqlMap>
